/*
 * This file is part of WPPConnect.
 *
 * WPPConnect is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * WPPConnect is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with WPPConnect.  If not, see <https://www.gnu.org/licenses/>.
 */

import { sendFile } from './send-file';

/**
 * Sends image to given chat if
 * @param {string} imgBase64 base64 encoded file
 * @param {string} chatid Chat id
 * @param {string} filename
 * @param {string} caption
 * @param {string} quotedMessageId Quoted message id
 * @param {boolean} isViewOnce Enable single view
 * @param {Function} done Optional callback
 */
export function sendImage(
  imgBase64,
  chatid,
  filename,
  caption,
  quotedMessageId,
  isViewOnce
) {
  return sendFile(
    imgBase64,
    chatid,
    filename,
    caption,
    'sendImage',
    quotedMessageId,
    isViewOnce
  );
}
